﻿using System;
using System.Collections.Generic;
using Reece.Open.Mvc.Atom.Contracts;

namespace Reece.Open.Mvc.Atom.Models
{
    [AtomRoot(ElementName = "feed", Namespace = "http://www.w3.org/2005/Atom")]
    public class Feed
    {
        [AtomElement(ElementName = "id")]
        public AtomId Id { get; set; }

        [AtomElement(ElementName = "title")]
        public string Title { get; set; }

        [AtomElement(ElementName = "updated")]
        public DateTime? Updated { get; set; }

        [AtomElement(ElementName = "published")]
        public DateTime? Published { get; set; }

        [AtomCollection(EntriesName = "author")]
        public IEnumerable<Person> Authors { get; set; }

        [AtomCollection(EntriesName = "entry")]
        public IEnumerable<Entry> Entries { get; set; }

        [AtomCollection(EntriesName = "link")]
        public IEnumerable<Link> Links { get; set; }
    }
}